<template>
  <div class="container">
    <span v-if="!loading"> 当前为开发环境，跳转到临时首页！ </span>
    <Spin v-else tip="正在加载中,请稍后..." />
  </div>
</template>

<script lang="ts" setup>
import { ref, unref } from 'vue'
import { isProdMode, getAppEnvConfig } from '@/utils/env'

import { Spin } from 'ant-design-vue'

const ENV = getAppEnvConfig()
const loading = ref(isProdMode())
if (unref(loading)) {
  window.location.href = `${ENV.VITE_APP_Micro_Apps_Main}/`
}
</script>

<style lang="less" scoped>
.container {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translate3d(-50%, -50%, 0);
}
</style>
